Skip to content

Remove unused batched-LDE wrapper functions#743

Merged
MauroToscano merged 1 commit into
mainfrom
cleanup/dead-batched-lde-fns
Jun 29, 2026
Merged

Remove unused batched-LDE wrapper functions#743
MauroToscano merged 1 commit into
mainfrom
cleanup/dead-batched-lde-fns

Conversation

@MauroToscano

@MauroToscano MauroToscano commented Jun 29, 2026

Copy link
Copy Markdown
Contributor

Removes dead, uncalled code from crypto/math-cuda/src/lde.rs−256 lines, +1 (the +1 is a one-line import collapse).

What's removed

Three pub fn wrappers with no callers anywhere on current main (verified across the whole repo — the only references are their own definitions and assert_u32_domain message strings):

  • coset_lde_batch_base_into_with_merkle_tree
  • coset_lde_batch_ext3_into_with_merkle_tree
  • coset_lde_batch_ext3_into_with_leaf_hash

They are thin non-_keep wrappers that delegate to the *_inner functions.

Interaction with #735 (why the ext3 _inner goes too)

This PR was rebased onto main after #735 ("unify & clean up the commitment layer") removed the coset_lde_batch_*_into_with_merkle_tree_keep variants. Consequences:

  • coset_lde_batch_base_into_with_merkle_tree_innerstays live, still called by coset_lde_batch_base_into_with_leaf_hash.
  • coset_lde_batch_ext3_into_with_merkle_tree_inner — once refactor(stark): unify & clean up the commitment layer #735 deleted the ext3 _keep, its only remaining callers were the two ext3 wrappers above. Removing them strands it as dead code, so this PR also removes:
    • the private coset_lde_batch_ext3_into_with_merkle_tree_inner, and
    • its now-unused imports launch_keccak_ext3 / launch_keccak_ext3_row_pair (collapsing the crate::merkle import to one line).

Note: previously these wrappers were pub, which masked the dead ext3 chain (pub items are treated as reachable). Dropping the pub wrappers is what exposes the orphaned private _inner.

Verification

  • Whole-repo grep on latest main: zero call sites for the three wrappers; after removal, zero references to coset_lde_batch_ext3_into_with_merkle_tree_inner and to launch_keccak_ext3*.
  • Retained and still referenced: coset_lde_batch_base_into_with_merkle_tree_inner, coset_lde_batch_base_into_with_leaf_hash, GpuLdeExt3, the row-major paths (coset_lde_*_row_major_with_merkle_tree_keep), and all kept crate::merkle imports.
  • rustfmt clean (the only stable-rustfmt diff is a pre-existing import-order quirk present on main, untouched here).
  • Not compiled locallymath-cuda requires the CUDA toolchain (no nvcc on the dev box) and only builds under the cuda feature, which standard PR CI does not enable. A CUDA build should confirm it's warning-clean (no dead_code/unused-import) before merge.

coset_lde_batch_base_into_with_merkle_tree,
coset_lde_batch_ext3_into_with_merkle_tree, and
coset_lde_batch_ext3_into_with_leaf_hash have no callers anywhere (only
their own definitions + assert-message strings) — thin pub wrappers over
the *_inner helpers.

Rebased onto main after #735 removed the
coset_lde_batch_*_into_with_merkle_tree_keep variants. With those gone,
the private coset_lde_batch_ext3_into_with_merkle_tree_inner was
reachable only through the two dead ext3 wrappers, so it (and its
now-unused launch_keccak_ext3 / launch_keccak_ext3_row_pair imports) is
removed here as well. The base *_inner helper stays live via
coset_lde_batch_base_into_with_leaf_hash.

Pure deletion. math-cuda needs the CUDA toolchain (no nvcc on the dev
box) — confirm with a CUDA build before merge.
@MauroToscano MauroToscano force-pushed the cleanup/dead-batched-lde-fns branch from b24c0bb to 5466f75 Compare June 29, 2026 23:07
@MauroToscano MauroToscano enabled auto-merge June 29, 2026 23:12
@MauroToscano MauroToscano added this pull request to the merge queue Jun 29, 2026
Merged via the queue into main with commit f9db93e Jun 29, 2026
13 checks passed
@MauroToscano MauroToscano deleted the cleanup/dead-batched-lde-fns branch June 29, 2026 23:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants